System and method for allocating communications to processors in a multiprocessor system

ABSTRACT

In a multiprocessor-system, a system and method assigns communications to processors, processes, or subsets of types of communications to be processed by a specific  5  processor without using a locking mechanism specific to the resources required for assignment.

FIELD OF THE INVENTION

The present invention is related to computer software and morespecifically to computer software for processing communications receivedby a multiprocessor computer system.

BACKGROUND OF THE INVENTION

Computer systems can process communications from sources and provideresponses. In a multiprocessor system, one or more network interfacecards (NICs) receive communications, and drive an interrupt signal toone or more of the processors to indicate that a communication has beenreceived. The interrupt resolution system in the computer system allowsa driver in one of the processors to respond to the interrupt, so thatthe communication can be processed and a response may be generated.Because the processors may share the processing of interrupts, theprocessor containing the driver that responds to the interrupt for acommunication received from one source may not be the processor that hadresponded to the interrupt for a prior communication received from thatsame source.

If the process that ultimately processes the communication requiresstate information from a prior communication, in the event that the sameprocessor processed the prior communication, the state information maybe in the processor's cache. The processing of the communication and thegeneration of the response in this event is quick and efficient,although an n-multiprocessor system, such efficient processing may onlyoccur 1/n of the time. The remainder of the time, the prior command wasprocessed by a different process or on a different processor, and so thecurrent state information from the prior communications will not be inthe cache of the processor that processes the current communication. If,however, a different one of the processors processed the priorcommunication, the processor responding to the interrupt and processingthe subsequent communication must retrieve the state information frommemory or disk, adding time to process the communication and produce aresponse and reducing the throughput of the system. Such inefficientprocessing occurs (n−1)/n of the time. As n grows to a larger number,the processing efficiency of the system decreases and the averageresponse time increases.

Other systems have the potential to improve the efficiency and responsetime of such systems, but can require complex contention managementsystems for the routing of messages to prevent the simultaneous accessof queues or other resources by different processors, and if the othersystems are implemented in hardware, can add hardware costs to themultiprocessor system.

What is needed is a system and method that can speed the processing andresponse to communications in a multiprocessor system without requiringany additional contention management systems and without adding hardwarecosts to the system.

SUMMARY OF INVENTION

A system and method uses a set of criteria and/or rules to assigncommunications to a processor, a process, or a type of communications ona processor, in a multiprocessor system. The criteria and/or rules maybe preloaded at system startup, received from one or more processesduring system operation, or both. The criteria and/or rules help ensurethat any context information from prior communications that may beuseful in processing the communication will be in the processor cache ofthe processor that processes each communication, speeding the processingof that communication without a special contention management system.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block schematic diagram of a conventional computer system.

FIG. 2 is a block schematic diagram of a system for assigningcommunications in a multiprocessor system according to one embodiment ofthe present invention.

FIG. 3 is a flowchart illustrating a method of assigning communicationsin a multiprocessor system according to one embodiment of the presentinvention.

FIG. 4 is a flowchart illustrating a method of receiving criteria forcommunications from processes according to one embodiment of the presentinvention.

FIG. 5 is a flowchart illustrating a method of incorporating criteriareceived from processes into a set of criteria used to assigncommunications in a multiprocessor system according to one embodiment ofthe present invention.

DETAILED DESCRIPTION OF A PREFERRED EMBODIMENT

The present invention may be implemented as computer 5 software on aconventional computer system. Referring now to FIG. 1, a conventionalcomputer system 150 for practicing the present invention is shown.Processor 160 retrieves and executes software instructions stored instorage 162 such as memory, which may be Random Access Memory (RAM) andmay control other components to perform the present invention. Storage162 may be used to store program instructions or data or both. Storage164, such as a computer disk drive or other nonvolatile storage, mayprovide storage of data or program instructions.

In one embodiment, storage 164 provides longer term storage ofinstructions and data, with storage 162 providing storage for data orinstructions that may only be required for a shorter time than that ofstorage 164. Input device 166 such as a computer keyboard or mouse orboth allows user input to the system 150. Output 168, such as a displayor printer, allows the system to provide information such asinstructions, data or other information to the user of the system 150.Storage input device 170 such as a conventional floppy disk drive orCD-ROM drive accepts via input 172 computer program products 174 such asa conventional floppy disk or CD-ROM or other nonvolatile storage mediathat may be used to transport computer instructions or data to thesystem 150. Computer program product 174 has encoded thereon computerreadable program code devices 176, such as magnetic charges in the caseof a floppy disk or optical encodings in the case of a CD-ROM which areencoded as program instructions, data or both to configure the computersystem 150 to operate as described below.

In one embodiment, each computer system 150 is a conventional SUNMICROSYSTEMS ULTRA workstation running the SOLARIS operating systemcommercially available from SUN MICROSYSTEMS, Inc. of Mountain View,Calif., a PENTIUM compatible personal computer system such as areavailable from DELL COMPUTER CORPORATION of Round Rock, Tex. running aversion of the WINDOWS operating system (such as 95, 98, Me, XP, NT or2000) commercially available 20 from MICROSOFT Corporation of RedmondWash. or a Macintosh computer system running the MACOS or OPENSTEPoperating system commercially available from APPLE COMPUTER CORPORATIONof Cupertino, Calif. and the NETSCAPE browser commercially availablefrom NETSCAPE COMMUNICATIONS CORPORATION of Mountain View, Calif. orINTERNET EXPLORER browser commercially available from MICROSOFT above,although other systems may be used.

Referring now to FIG. 2 a block schematic diagram of system forassigning communications in a multiprocessor system is shown accordingto one embodiment of the present invention.

In one embodiment, all communication into or out of system 200 is madevia input/output 208 of communication interface 210 which is coupled toa network such as the Internet or a local area network or both.Communication interface 210 is a conventional communication interfacethat supports TCP/IP or other conventional communication protocols.

A communication is Received and Stored

A communication is received by communication interface 210 andcommunication interface 210 stores the communication in a buffer inbuffer storage 232.

In one embodiment, buffer storage 232 is part of system storage 230,which is conventional disk storage or memory, and each buffer containssufficient space to hold the largest possible communication that may bereceived. When communication interface 210 has completed storing thecommunication to a buffer in buffer storage 232, communication interface210 places the address or index of the buffer into which thecommunication was stored into a specified storage location or queue,such as a storage location or queue within the address space of thecommunication interface 210 itself, and signals an interrupt oninterrupt line 212. Processors 250-251 monitor the interrupt line 212,and one of the processors will be chosen to handle the interrupt, usingany conventional multiprocessor interrupt processor selection technique,such as are described in U.S. Pat. No. 5,379,434 issued to DiBrino onJan. 3, 1995. Two processors 250-251 are shown in FIG. 2, however, anynumber of processors in a multiprocessor system may be used by thepresent invention.

Each processor 250-251 contains a driver 220-221 to handle theinterrupt. The processor 250-251 that responds to the interrupt does soby transferring control to the driver 220-221 on that processor. Eachprocessor 250-251 also runs any number of processes 252-258 that receiveand process communications, for such processes 252-258 being shown inthe figure, two for each processor 250-251, although any number ofprocesses may be used and the number of processes need not be the samefor each processor 250-251. The processes 252-258 can be anyconventional process, such as application programs and any other processcapable of processing a received communication.

Communication Identifier Identifies the Entity to which theCommunication Should be Assigned

Communication, assigner 222 in the driver 220-221 that handles theinterrupt, identifies the entity, such as a processor 250, 251, to whichthe communication should be assigned.

In one embodiment communication assigner 222 can not only identify asthe entity to which the communication should be assigned as a processor250 251, but also may identify as the entity a process 252-258 on thatprocessor 250-251, or identifies as the entity a type (corresponding toa type queue described below) of communications to be processed by theidentified processor 250-251 as described in more detail below. Theidentification and subsequent assignment of a communication to aprocessor 250, 251, and optionally a specific process 252-258 or type,may be performed in any number of ways, some of which will now bedescribed.

In one embodiment, to make the identification, communication assigner222 retrieves from communication interface 210 the address or index ofthe buffer into which the communication was stored, reads from bufferstorage 232 some or all of the header, or other portion, or all, of thecommunication using the address or index of the buffer it retrieves, andidentifies a corresponding processor 250-251 and/or optionally, aprocess 252-258 or a type of communications to be processed by aprocessor 250-251, by performing a function on some or all of the bitsin the header of the communication. For example, if the communication isa TCP packet, communication assigner 222 may use the least significantbit of the destination IP address from the header of the communicationas the most significant bit of a two-bit result and use the leastsignificant bit of the destination port of the header of thecommunication as the least significant bit of the result, and thenidentify a process 252-258 to which the communication should be assignedbased on the result. For example, if the result is 00, process 252 isidentified as the entity to which the communication should be assigned,if the result is 01, process 254 is identified as the entity to whichthe communication should be assigned, if the result is 10, process 256is identified as the entity to which the communication should beassigned, and if the result is 11, process 258 is identified as theentity to which the communication should be assigned.

A similar technique may be used to assign communications to processors250-251 if it is not desirable to assign communications directly toprocesses. This may be because there are multiple processes on the sameprocessor that can process a given communication, and pooling suchcommunications for processing by any capable process can ensure thatthey are processed in a manner that more closely corresponds to theorder in which they are received, while ensuring that any such processhas access to the context information in the processor cache fromprocessing prior communications. This can also allow the processes toretrieve communications using conventional operating system calls,provided that the communications identified for each processor areplaced into a data structure compatible with the operating system. As anexample of the manner in which a processor may be identified as theentity to which the communication is assigned, the two bits in theresult described above may be exclusive, and if result of the exclusiveor is 1, 20 processor 250 is identified as the entity to which thecommunication should be assigned and if the result of the exclusive oris 0, processor 251 is identified as the entity to which thecommunication should be assigned.

A similar technique may be used to identify communications as a type ofcommunications to be processed by a given processor. The identification,and subsequent assignment of a communication to a type of communicationsto be processed by a certain processor allows assignment to processesthat can process that type of communication, without assigning thecommunication to a specific process, so that it may be processed moreclosely to the order in which it was received. In addition, as describedin more detail below, a process on a processor that processescommunications of a given type may retrieve such communications directlyfrom the data structure for that type and processor, without anintervening process or operating system to distribute communications tothose processes that can process them. In the example above, if theresult is 00, the communication is identified as being a first type onprocessor 250, if the result is 01, the communication is identified asbeing a second type on processor 250, if the result is 10, thecommunication is identified as being a first type on processor 251, andif the result is 11, the communication is identified as being a secondtype on processor 251. As described in more detail below, each type andprocessor has its own queue, and so the entity identified as the entityto which the communication should be assigned is the queue correspondingto the type and processor.

The above were representative functions used to identify as the entityto which the communication should be assigned as a process, processor orqueue for a type of communication to be processed by a certainprocessor.

However, in other embodiments, other functions of arbitrary complexitymay be used on any portion of the header to assign the communication.For example, a hash function on any or all of the source and destinationIP addresses and ports and the protocol may be used in place ofassignment of bits as described above. The contents of the message maybe used for the function and other information other than the TCPheader, such as an IP header, or even the time of day or a random numberor pseudo-random number may be used to identify the entity to use forassignment of the communication.

In other embodiments of the present invention, lookup tables and thelike may be used in place of the function, or in addition to it. In oneembodiment, the lookup table may be pre-stored in processor identifierstorage 234. Each row in the lookup table may contain a criteria (forexample source IP address and port, followed by destination address andport, followed by protocol, with don't care symbols as wildcards) that,can be compared to some or all of the communication or other information(e.g. date and time) to determine whether the communication correspondsto that row in the lookup table. Other information in each row of thelookup table can be used to identify a process, processor or type ofcommunication to be processed by a processor, to which the communicationshould be assigned when the communication corresponds to the criteria inthe row. For example, an identifier of a queue in queue storage(described below) corresponding to the processor, process or type queuein queue storage 236 (described below) to which the communication shouldbe assigned if it corresponds to the criteria of the row may be storedas another column of the table. The lookup table may be suppliedprefilled, read into assignment criteria storage 234 from a file atsystem startup by update manager 240, or may be filled in response tomessages received from processes 252-258 or other processes as describedin more 20 detail below. Because the drivers 220-221 respond tointerrupts, only one driver 220-221 will access the lookup table inassignment criteria storage 234 at a given time, and thus, drivers220-221 may share a single lookup table, although in other embodiments,each driver 220-221 has its own lookup table, which may be a copy of theothers, or may contain differences representing the preference forassigning communications to the processor 250-251 on which the driver220-221 executes as described below.

Resolution Between Conflicting Entities

More complex functions may be performed on the communications receivedthan those described above, some of which may not be mutually exclusive,or the criteria in the table entries may overlap. In such embodiment,the communication being assigned in the manner described herein may meetthe criteria for any of several rows in the table.

In one such embodiment, communication assigner 222 may use an internallystored set of rules, such as to prefer assignment to the processor250-251 on which the communication assigner 222 making the assignmentruns, and to prefer assignment corresponding to a specific process252-258 ahead of assignment for a type of communication, and to prefersuch assignment for a type of communication ahead of assignment for theprocessor 250-251. To allow such preferences to be expressed, the typeof entity to which the communication corresponding to the criteria willbe assigned is stored with the criteria in assignment criteria storage234 or it may be implied from the identifier of the queue to which thecommunication should be assigned.

In one embodiment, ranges of process identifiers capable of beingassigned to processes running on each processor 250-251 and identifiersof the processors 250-251 themselves may be stored in assignmentcriteria storage, and the table rows reference the processor identifiersand/or process identifiers to allow communication assigner 222 (whichinternally stores the identifier of the processor 250-251 on which itoperates as described below) to assign communications in accordance withthese internally stored preference rules. Each row in the table inassignment criteria storage 234 may contain a preference field thatcommunication assigner 222 can use to resolve the criteria for multiplerows matching a communication. Remaining ties may be broken at random,round robin, or other conventional ways of breaking ties.

Assigning the Communication to a Queue Corresponding to the EntityIdentified

After the assignment identification is made by 20 communication assigner222 as described above, in one embodiment, communication assigner 222assigns the communication to a queue or other storage in queue storage236 that corresponds to the entity identified. To assign a communicationto a processor, a type of communications within a processor, or aprocess on a processor, the pointer to the communication is provided tothe end of a corresponding queue in queue storage 236, which is a partof system storage 230. Queue storage 236, described in more detailbelow, contains queues for each processor in one embodiment, eachprocess in another embodiment, or for each type of communication for agiven processor, in still another embodiment.

Another embodiment may employ any combination of these, for example,having one queue per process, and a queue for the processor to handlecommunications that do not meet the criteria for assignment to aparticular process.

In one embodiment, queue storage 236 is composed of several queues. Thehead pointer and tail pointer for each queue is stored in one part ofqueue storage 236 and the contents of each queue are stored in adifferent part of queue storage 236. The pointers for queues of eachtype (e.g. process queues, processor queues and queues forcommunications designated as being of a certain type to be processed ona certain processor) can be stored together in a logical order such asthe order of the identifier of the process, processor or type, so thatan offset corresponding to the queue can be identified from the process,processor 17 or type to which the communication should be assigned,identified as described above. The offset from a base address of thequeue into which the communication matching the criteria should bestored, is stored in the table entry or may be calculated using theresult of the function. The address or offset may be a function of thetype of queue (e-g. processes have one base address, processors haveanother and types of communications assigned to a processor have anotherbase address). In the case of a processor or process, the identifier ofthe processor and process may be used to calculate the offset (e.g.every queue has two words: a head pointer and a tail. pointer, andtherefore, the address of the queue for processor is the base addressfor processor queues+6 words). In the case of types, a type identifiermay be provided by the application with the criteria, and the typeidentifier is used to calculate the offset in the manner described abovefor the processor identifier. In other embodiments, pending assignmentmanager 228 may provide the base address and offset from a base addressfor an unused queue that corresponds to the criteria received, inresponse to receipt of the criteria.

The address of the queue contains a head pointer and a tail pointer ofthe queue. Storage for the contents of the queue is also located inqueue storage 236 at another location, with sufficient space for eachqueue based on the expected traffic for the type of queue or the varioustypes of queues. Although the description above describes theidentification of the entity to which the communication should beassigned, and then the assignment of the, communication to a queuecorresponding to that entity, in one embodiment, the identification ofthe entity may be performed by identifying the queue corresponding tothe entity. In such embodiment, the actual identity of the entity thatcorresponds to the queue need not be “known”, as the queue acts as asurrogate for an identifier of the entity.

Processes can Control the Identification and Assignment Process bySupplying Rows to be Incorporated into the Table

In one embodiment, each process 252-258 may instruct pending assignmentmanager 228 that it desires to handle communications meeting a certaincriteria. For example, a process 252-258 may instruct pending assignmentmanager 228 in the driver 220-221 for the processor 250-251 on which theprocess 252-258 is running that it wishes to handle communicationshaving a particular destination port and protocol by providing thiscriteria (for example, using the format of the criteria column of thetable described above) and the identifier of the process, and anoptional preference value as described above. Alternatively, arepresentative process 252-258 of a processor 250-251 may providemultiple rows of the table on behalf of other processes 252-258 runningon that processor 250-251 to pending assignment manager 228 on the sameprocessor 250-251 as the process supplying the information. Pendingassignment manager 228 stores the information at the end of a pendingassignment criteria queue for that driver 220 221 in pending assignmentstorage 238, which contains one such queue for each driver 220-221.Because the processes 252-258 can provide this information at any time,including having one process 252-258 on each different processor 250-251send such information simultaneously, the use of separate driver queueseliminates the requirement of a locking mechanism that would otherwisebe required to prevent the simultaneous use of assignment criteriastorage 234.

In one embodiment, a separate queue exists in pending assignment storage238 for each process 252-258 or for each process 252-258 that mayprovide such information to pending assignment manager 228 to avoidlocking requirements that could otherwise be necessary for theper-driver queues described above, to account for scheduling conflictsthat could occur if another process interrupts the storage of theinformation into the per driver queue. A locking mechanism may also beemployed on the pending assignment criteria queue on the assumption thatsuch a mechanism will not cause delays too frequently. The informationin pending assignment storage 238 may be transferred into assignmentcriteria storage 234 at a later time, in any of a number of differentways.

In one embodiment, update manager 240 periodically halts the operationof drivers 220-221 to add the entries in all of the queues in pendingassignment storage 238 to the lookup table in assignment criteriastorage 234. At system shutdown, update manager 240 incorporates anypending entries from pending assignment storage 238 into the table ortables in assignment criteria storage 234 and then saves the table ortables into disk storage. At system startup, update manager 240 readsthe file and stores the table contained therein into the table or tablesin assignment criteria storage 234, and then installs the remainder ofthe drivers 220-221 to allow them to begin operating.

In embodiments in which there are multiple lookup tables in assignmentcriteria storage 234, update manager 240 may add the information fromthe entries in pending assignment storage 238 into all of the tables, orsome of the tables, or may add one version into one or more tables andanother version into one or more different tables (e.g. adding differentpreference values for each table to be used by the driver 220-221running on the processor 250-251 corresponding to the queue to which thecommunication should be assigned so that communication assigner 222 neednot use the type of the assignment to determine the preference asdescribed above.

In another embodiment, entries from the queue corresponding to thedriver (or the queues for the processes that provide information to thatdriver) in pending assignment storage 238 are incorporated intoassignment criteria storage 234, during the operation of 20 that driver.In such embodiment, after communication assigner 222 completes theassignment of a communication as described herein, it signalsincorporation manager 224, which scans just the pending assignment queueor queues in pending assignment storage 238 which contains criteria andother information received from processes of the processor on whichincorporation manager 224 is being executed, and updates in assignmentcriteria storage 234 the lookup table or tables used by all drivers220-221 that share a communication resource with the driver containingthat incorporation manager 224, before returning program control to theprocessor 250-251. Although this process only updates assignmentcriteria storage 234 with information from a single processor 250-251,as the other drivers 220-221 assign communications, they will use theirpending assignment criteria queues to update the table or tables.Because only one driver 220-221 of the drivers that share acommunication resource operates at any given time, contention for thetable or tables in assignment criteria, storage 234 used by thosedrivers is avoided, eliminating the need for a locking mechanism toprevent simultaneous access to the table or tables in assignmentcriteria storage 234. If the processor 250-251 will prioritize thedriver ahead of any processes that operate on that processor 250-251,interference involving the pending criteria queues is eliminated, andthus, using this embodiment, updates may occur more frequently thanwould otherwise be possible if system initialization and periodicupdates were the only time the pending criteria were applied to thetable or tables.

Processes Retrieve Communications from an Operating System or Directlyfrom a Queue, Bypassing the Operating System.

As described herein, the assignment of communications to processors,processes or types of communications for a processor are made withoutuse of the operating system of the multiprocessor computer system. Inone embodiment, communications are assigned to processor queues asdescribed above.

In such embodiment, the operating system (not shown) running on eachprocessor reads the processor queue and provides communications toprocesses 252-258 as if the processor queue was the queue from thecommunication interface 210.

In such embodiment, communication assigner 222 can provide a softwareinterrupt to the processor corresponding to the processor to which, thecommunication was assigned, to simulate a communication interfaceproviding such interrupt.

In such embodiment, processes 252-258 request communications usingconventional operating system calls such as socket calls, and theoperating system may process them with little or no change to the codefor processing communication's received from a communication interface210 in the conventional manner.

In another embodiment, each process 252-258 may retrieve communicationscorresponding to the pointers in the various queues in queue storage236. A process 252-258 may retrieve a communication corresponding to apointer in a queue corresponding to that process 252-258, withoutemploying a locking capability because no other process will retrievecommunications from that queue. A process 252-258 may retrieve acommunication corresponding to a pointer in a queue corresponding to theprocessor 250-251 on which the process 252-258 runs. A process 252-258may retrieve a communication corresponding to a pointer in a queuecorresponding to the processor 250-251 on which the process 252-258 runsthat also corresponds to a type of communication processed by thatprocess. A locking mechanism may be used for the last two techniques, ora separate process may handle providing pointers to the communicationfrom each such queue using queued requests for communications. A process252-258 may retrieve a communication from any combination of the above,in other embodiments of the present invention. This arrangement canbypass the operating system (not shown) under which each of theprocesses 252-258 run, to receive and to provide communications to theprocesses 252-258.

No Lockins Required

Because communication interface 210 provides only a single interrupt ata time, and each driver 220-221 has control of the processor 250-251 onwhich it resides during the time it is responding to the interrupt,there is no contention for the criteria in assignment criteria storage234, and if internally stored functions are used in the communicationassigners 222, contention for the criteria is eliminated. Because onlyone communication resource device interrupt will be processed at a time,contention among drivers for the queues in queue storage 236 is avoidedas well. Furthermore, because the processes 252-258 (or operatingsystem) retrieve pointers to communications from the head of the queuesin queue storage 236, and each driver 220-221 adds pointers tocommunications to the end of the queues in queue storage 236, there isno contention for the pointers to the queues in queue storage 236, otherthan a check, using the end of the queue, that the processes 252-258make to verify that the queue is not empty. If, when a communicationpointer is added to the end of a queue, the end of the queue pointer isupdated after the pointer, to the communication is written to the queue,and the end of queue pointer is not greater than a single data word, thememory bus contention controls will accommodate the contention issuesbetween the drivers 250-251 and the processes 252-258 and eliminate theneed for a locking mechanism dedicated to preventing contention for thequeues in queue storage 236. If there are multiple communicationinterfaces 210, 214 supplying communications to the various drivers220-221, 214, if all of the communication interfaces 210-214 share asingle interrupt, conventional interrupt contention controls willaccommodate the contention issues. Alternatively, the communicationinterfaces 210, 214 may be divided into pools of one or morecommunication interfaces 210, 214 (each pool referred to as a“communication resource”) and each communication resource may share aninterrupt, which is serviced by a set of one or more drivers.

In one such embodiment, the drivers in the set assign communications insuch a manner that they may only be processed by processes 252-258operating on processors on which the drivers in the set execute. Thus,unless otherwise noted, the present invention may operate to providecommunications without the use of a locking mechanism that is specificto the queues in queue storage 236 or the lookup table or tables inassignment criteria storage 234. A locking mechanism is a mechanism inwhich processes and/or, drivers check the availability of a sharedresource such as queues or other memory resources before using it toensure that it is not being used by another process and/or driver. Inthe circumstance in which a locking mechanism indicates the sharedresource is in use, the process or driver that checked the availabilityof the shared resource may have to sit idle and check it again, wastingprocessor cycles. Even if the shared resource is available, therequirement that the locking mechanism be checked each time can usesignificant ‘processing resources not required by various embodiments ofthe present invention, which does not employ such a locking mechanism.As such, communications are stored, assigned and provided to processesor queues by the present invention “sinelockingly”, which means “withoutthe use of a locking mechanism that is dedicated to the use of storage,and/or the assignment, and/or the providing, of communications receivedby a computer system”. The memory bus contention mechanisms andinterrupt contention mechanisms used as described above do not affectwhether a communication is stored, assigned or provided to processessinelockingly because they are not dedicated to such use: they haveother uses.

Methods

Referring now to FIG. 3, a method of assigning communications receivedis shown according to one embodiment of the present invention. Controlis transferred in response to an interrupt received as described above310. An assignment is identified 312 from some or all of thecommunication as described above. The assignment may be identified usinga calculation, or using a lookup table as described above to identifythe entity or queue (corresponding to a process, processor or type ofcommunication to be processed by a processor) to which, thecommunication should be assigned. The method continues at step 322. Atstep 322, the assignment identified in step 312 is made to a queuecorresponding to a processor, process or type of communication on aprocessor and the method continues at step 310. Step 322 may includeproviding an interrupt to the processor corresponding to the queue towhich the communication was assigned and other actions to simulatereceipt of the communication for processing in a conventional fashion asdescribed above.

In one embodiment, illustrated by the dashed lines in the Figure,instead of continuing at step 310, after step 322, a pending assignmentcriteria queue for the processor on which the method of FIG. 3 is beingexecuted is checked 324. If there are pending assignment criteria inthat queue 326, the criteria in that queue are applied to the criteriaused to assign communications, the queue is set to empty 328 and themethod continues at step 310. Referring now to FIG. 4, a method ofreceiving criteria from a process describing communications it canprocess is shown according to one embodiment of the present invention.The criteria, and an indication of the process or processor or a type towhich communications meeting the criteria should be assigned is received410. The information received in step 410 may include an indication 20that the process should be rescheduled for the processor on which thedriver assigning the communication is operating, as described above. Thecriteria and other information are stored 412 into a pending assignmentcriteria queue or other storage device, awaiting incorporation into aset of criteria. Storage may be performed by converting the informationreceived into one or more table entries as described above, includingadding a preference value to the table entry for each such criteria foruse as described I above. Referring now to FIG. 5, a method ofincorporating information received from processes into a set of criteriaused to assign communications is shown according to one embodiment ofthe present invention. An update signal is received 510. The updatesignal may be received as a part of a system initialization or may beperiodically performed as described above. If there are pendingassignment criteria awaiting incorporation 512, the criteria and relatedinformation described above, such as an identifier, f the processor,process, or type of communications assigned to a processor, preferenceinformation, and whether the assignment should be made to a processrunning on a processor on which the assignment is being made, areincorporated into the criteria used to assign communications 514 and themethod continues at step 516. Otherwise 512, the method continues atstep 516. At step 516, the method terminates.

1. In a computer system comprising a plurality of processors separatelycapable of responding to an interrupt from a communication interface, amethod of assigning each of a plurality of communications, the methodcomprising: 5 receiving at a first processor a first communication ofthe plurality; responsive to at least a portion of the communicationreceived, sinelockingly assigning, at the first processor, the firstcommunication to, at least one selected from a 10 first one of theplurality of processors, a first one of the plurality of processes andfirst one of the plurality of types of communications to be processed byone of the plurality of processors; receiving at a second processor asecond communication 15 of the plurality; and responsive to at least aportion of the communication received, sinelockingly assigning, at thesecond processor, the second communication to at least one selected froma second one of the plurality of processors, a second one of 20 theplurality of processes and a second one of the plurality of types ofcommunications to be processed by one of the plurality of processors. 2.The method of claim 1 wherein each of at least one of the assigningsteps is additionally responsive to information received from at leastone of the plurality of processes.
 3. The method of claim 1 wherein:during and after the receiving the first communication step, and priorto and before and during the assigning the first communication step, thefirst communication is not 5 provided to, or received from, an operatingsystem; and during and after the receiving the second communicationstep, and prior to and before and during the assigning the secondcommunication step, the second communication is not provided to, orreceived from, an 10 operating system.
 4. The method of claim 1 whereinat least one selected from: the first one of the plurality of processorscomprises the second one of the plurality of processors; the first oneof the plurality of processes comprises the, second one of the pluralityof processes; and the first one of the plurality of types ofcommunications to be processed by one of the plurality of processorscomprises the second one of the plurality of 10 types of communicationsto be processed by one of the plurality of processors
 5. The method ofclaim 1 wherein: the first communication and the second communicationcomprise TCP packets; and the at least the portions of the firstcommunication 5 and the second communication comprise TCP headers of thefirst communication and the second communication.
 6. The method of claim1, wherein: the assigning the first communication step comprisesassigning the first communication to a first one of a plurality ofqueues; 5 the assigning the second communication step comprises 1assigning the second communication to a second one of the plurality ofqueues; and each of the first processor and the second processor iscapable of assigning the plurality of communications to 10 the firstqueue and the second queue.
 7. The method of claim 1 wherein theassigning steps are responsive to at least one function.
 8. The methodof claim 1 wherein the assigning steps are responsive to at least oneset of criteria.
 9. A system for allocating a plurality of receivedcommunications comprising: a plurality of processors forming amultiprocessor system that hosts an operating system, each processorequipped with a driver containing a communications assignor and at leastone process that receives and processes communications; a system storagecommunicatively coupled with the plurality of processors, the systemstorage having at least one buffer that is identifiable by an index andadapted to store at least one of the plurality of receivedcommunications; and a communication interface communicatively coupledwith the plurality of processors and the system storage and configuredto receive the plurality of communications, the communication interfaceincluding an address space having at least one queue adapted to storethe index identifying the at least one buffer in the system storage thatstores the at least one of the plurality of received communications,wherein the at least one process on each processor is adapted to receiveand process the received communications cooperatively with the systemstorage and independently of the operating system and any form oflocking mechanism to enable coordinated access to the system storage bythe plurality of processors.
 10. The system of claim 9 wherein thesystem storage is selected from the group consisting of a disk storageand memory.
 11. The system of claim 9 wherein each communication in theplurality of received communications is characterized by a size boundedby a maximal size and the at least one buffer is configured to store atleast one of the plurality of received communications having the maximalsize.
 12. The system of claim 9 wherein the process on each processor isan application program adapted to process at least one of the pluralityof received communications.
 13. The system of claim 9 wherein theplurality of received communications are TCP packets.